const KoaRouter = require('koa-router')

const {auth} = require('../middleware/auth.middleware')

const {addCart,findAll,updateCart,destoryCart,allOrNotAll} = require('../controller/cart.controller')

const cartRouter = new KoaRouter({prefix:'/cart'})

cartRouter.post('/addCart', auth, addCart)
cartRouter.get('/findAll',findAll)
cartRouter.patch('/updateCart',updateCart)
cartRouter.post('/destoryCart',destoryCart)
cartRouter.post('/allOrNotAll',allOrNotAll)

module.exports = cartRouter

